From a9aa1a0d2904e322276d5c3cefdef465128f5516 Mon Sep 17 00:00:00 2001 From: Christian Limpach Date: Thu, 4 Jan 2007 15:50:08 +0000 Subject: [PATCH] [linux] Fix vsnprintf patch not to write null byte past the end of the buffer. Signed-off-by: Christian Limpach --- patches/linux-2.6.16.33/vsnprintf.patch | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/patches/linux-2.6.16.33/vsnprintf.patch b/patches/linux-2.6.16.33/vsnprintf.patch index 69a93fa5c5..3e32773986 100644 --- a/patches/linux-2.6.16.33/vsnprintf.patch +++ b/patches/linux-2.6.16.33/vsnprintf.patch @@ -203,7 +203,7 @@ index b07db5c..f595947 100644 + if (str < end) + *str = '\0'; + else -+ *end = '\0'; ++ end[-1] = '\0'; + } + /* the trailing null byte doesn't count towards the total */ return str-buf; -- 2.30.2